package com.yuan.yblog.search;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.data.elasticsearch.ElasticsearchDataAutoConfiguration;
import org.springframework.boot.autoconfigure.data.elasticsearch.ElasticsearchRepositoriesAutoConfiguration;
import org.springframework.scheduling.annotation.EnableAsync;

import java.text.SimpleDateFormat;
import java.util.Date;

@SpringBootApplication(scanBasePackages = "com.yuan.yblog")
public class YblogSearchApplication {
    public static void main(String[] args) {
        // 解决elasticsearch启动保存问题
        System.setProperty("es.set.netty.runtime.available.processors", "false");

        // 启动
        SpringApplication.run(YblogSearchApplication.class, args);

        // 查看
        System.out.print("启动时间："+new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
        System.out.print("\t项目入口：http://127.0.0.1:8081");
        System.out.println("\tSwagger-UI入口：http://127.0.0.1:8081/swagger-ui/index.html");
    }
}
